package com.yao.aop.aspect;

import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;

import java.util.Arrays;

/**
 * Copyright (C), 2022-2023, 姚兵
 * Author: 32210
 * Date: 2023/2/9 15:30
 * FileName: LogAspect
 * Description: \
 */

@Component
@Aspect
@Slf4j
public class LogAspect {


    @Pointcut(value = "execution(* com.yao.aop.impl.*.*(..))")
    public void pointcut(){

    }
    @Before(value = "pointcut()")
    public void logAspect(JoinPoint joinPoint){
        log.info("{}", Arrays.toString(joinPoint.getArgs()));
    }
}
